package com.taobao.api.request;

import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;

import com.taobao.api.response.TmallExchangeRefusereasonGetResponse;

/**
 * TOP API: tmall.exchange.refusereason.get request
 * 
 * @author top auto create
 * @since 1.0, 2018.08.09
 */
public class TmallExchangeRefusereasonGetRequest extends BaseTaobaoRequest<TmallExchangeRefusereasonGetResponse> {
	
	

	/** 
	* 换货单号ID
	 */
	private Long disputeId;

	/** 
	* 换货申请类型：0-任意类型；1-售中；2-售后
	 */
	private Long disputeType;

	/** 
	* 返回字段
	 */
	private String fields;

	public void setDisputeId(Long disputeId) {
		this.disputeId = disputeId;
	}

	public Long getDisputeId() {
		return this.disputeId;
	}

	public void setDisputeType(Long disputeType) {
		this.disputeType = disputeType;
	}

	public Long getDisputeType() {
		return this.disputeType;
	}

	public void setFields(String fields) {
		this.fields = fields;
	}

	public String getFields() {
		return this.fields;
	}

	public String getApiMethodName() {
		return "tmall.exchange.refusereason.get";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("dispute_id", this.disputeId);
		txtParams.put("dispute_type", this.disputeType);
		txtParams.put("fields", this.fields);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallExchangeRefusereasonGetResponse> getResponseClass() {
		return TmallExchangeRefusereasonGetResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(disputeId, "disputeId");
		RequestCheckUtils.checkNotEmpty(fields, "fields");
		RequestCheckUtils.checkMaxListSize(fields, 20, "fields");
	}
	

}